﻿using System;
using System.Collections.Generic;
using System.Data.Objects;
using System.Linq;
using System.Text;


namespace PhotoGalleryEnteties
{
    public interface  IContext
    {
        ObjectSet<Album> Albums { get;  }
        ObjectSet<PhotoComment> PhotoComments { get; }
        ObjectSet<GalleryUser> GalleryUsers { get;}
        ObjectSet<PhotoInfo> Photos { get; }
        ObjectSet<Tag> Tags { get; }

        T CreateObject<T>()where T:class;
        int SaveChanges();
        void DeleteObject(object entity);
       
        IEnumerable<PhotoInfo> RecentCommented(Guid userId);
        void AddSubscribeForComments(Guid user, int photo, DateTime observeDate);
        bool UpdateSubscribe(Guid user, int photo, DateTime observeDate);
        IEnumerable<Guid> SubscribedUsersIds(int photo);
        bool SubscribeExists(int photo, Guid  user);
        IEnumerable<string> GetAllowedRoles();
       
        IEnumerable<PhotoInfo> GetRandomPhotos(int count);




    }
}
